﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
	<Thickness x:Key="DefaultMargin" Bottom="4" Left="4" Top="4" Right="4" />
	<Style x:Key="LinkText" TargetType="{x:Type TextBlock}">
		<Setter Property="TextDecorations" Value="Underline" />
		<Setter Property="Foreground" Value="#0066CC" />
		<Setter Property="Cursor" Value="Hand" />
		<Setter Property="Margin"  Value="2 0 2 0" />
		<Style.Triggers>
			<Trigger Property="IsMouseOver" Value="True">
				<Setter Property="Foreground" Value="#3399FF" />
			</Trigger>
			<Trigger Property="IsEnabled" Value="False">
				<Setter Property="TextBlock.Foreground" Value="#333333" />
				<Setter Property="TextBlock.TextDecorations" Value="None" />
				<Setter Property="TextBlock.Cursor" Value="Arrow" />
			</Trigger>
		</Style.Triggers>
	</Style>
	<Style x:Key="LinkButton" TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<TextBlock Style="{StaticResource LinkText}" Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}" />
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<Style x:Key="IndentedGrid" TargetType="{x:Type Grid}">
		<Setter Property="Margin" Value="24 0 0 0" />
	</Style>
	<Style TargetType="{x:Type Grid}" x:Key="WindowGrid">
		<Setter Property="Margin" Value="{StaticResource DefaultMargin}" />
	</Style>
	<Style TargetType="{x:Type StackPanel}" x:Key="DefaultStackPanel">
		<Setter Property="Margin" Value="{StaticResource DefaultMargin}" />
	</Style>
	
	<Style TargetType="{x:Type TextBox}">
		<Setter Property="Margin" Value="4 0 4 0" />
	</Style>
    
    <Style x:Key="CommandButton" TargetType="{x:Type Button}">
        <Setter Property="Margin" Value="{StaticResource DefaultMargin}" />
    </Style>
	
	<Style x:Key="TabCloseButton" TargetType="{x:Type Button}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type Button}">
					<Grid>
						<Border x:Name="Border" BorderBrush="#B6B6B6" Opacity="0.0" BorderThickness="1" CornerRadius="3">
							<Border.Background>
								<LinearGradientBrush StartPoint="0,0" EndPoint="0,1" >
									<GradientStop Color="White" />
									<GradientStop Color="#E6E6E6"  Offset="1" />
								</LinearGradientBrush>
							</Border.Background>
						</Border>
						<TextBlock Text="r" FontFamily="Marlett" VerticalAlignment="Center" Margin="4 0 4 0 ">
							<TextBlock.Foreground>
								<SolidColorBrush x:Name="TextColor" Color="#B6B6B6" />
							</TextBlock.Foreground>
					</TextBlock>
						<Grid.Triggers>
							<EventTrigger  RoutedEvent="Grid.MouseEnter">
								<BeginStoryboard>
									<Storyboard>
										<ColorAnimation To="#ee0000" Duration="00:00:00.25" Storyboard.TargetProperty="Color" Storyboard.TargetName="TextColor" />
										<DoubleAnimation To="1.0" Duration="00:00:00.25" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Border"/>
									</Storyboard>
								</BeginStoryboard>
							</EventTrigger>
							<EventTrigger RoutedEvent="Grid.MouseLeave">
								<BeginStoryboard>
									<Storyboard>
										<ColorAnimation To="#B6B6B6" Duration="00:00:00.25" Storyboard.TargetProperty="Color" Storyboard.TargetName="TextColor" />
										<DoubleAnimation To="0.0" Duration="00:00:00.25" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Border" />
									</Storyboard>
								</BeginStoryboard>
							</EventTrigger>
						</Grid.Triggers>
					</Grid>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
	</Style>
</ResourceDictionary>